/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package buttonexample;

import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.*;

/**
 *
 * @author anxiao chen
 */
public class MyFrame extends JFrame  implements ActionListener{

   
    MyButtonPanel button = new MyButtonPanel();
    JTextField t = new JTextField();
    JLabel label1 = new JLabel();
    JLabel label2 = new JLabel();
    
    
    
       private ImageIcon icon = new ImageIcon("F:/1.jpg"); 
       private ImageIcon icon2 = new ImageIcon("F:/2.jpg"); 
       private ImageIcon icon3 = new ImageIcon("F:/3.jpg"); 

    
    public MyFrame() {   
       
        JPanel p1 = new JPanel(new FlowLayout(FlowLayout.LEFT,5,0)); 
        JLabel a = new JLabel(icon); 
        p1.add(a); 
        setLayout(new GridLayout(10,10,2,10)); 
        add(p1); 
 
        JPanel p2 = new JPanel(new FlowLayout(FlowLayout.LEFT,5,0)); 
        JLabel b = new JLabel(icon2); 
        p2.add(b); 
        setLayout(new GridLayout(10,10,2,10)); 
        add(p2); 
       
        JPanel p3 = new JPanel(new FlowLayout(FlowLayout.LEFT,5,0)); 
        JLabel c = new JLabel(icon3); 
        p3.add(c); 
        setLayout(new GridLayout(10,10,2,10)); 
        add(p3);  
 
        JPanel p8 = new JPanel();
        p8.add(t);
        t.setText("          search             ");
        add(p8);
 
        Container contentPane = getContentPane();
        contentPane.setLayout(new FlowLayout());
        contentPane.add(label1);
        contentPane.add(button);

        setTitle("online shop");
        setDefaultCloseOperation(EXIT_ON_CLOSE);
        setVisible(true);
      
    }

     public void actionPerformed(ActionEvent e) {
        throw new UnsupportedOperationException("Not supported yet.");
    }

    
  
}
